#include <stdio.h>
#include <string.h>
 
void reverseString(char *str) {
    int len = strlen(str);
    char temp;
    for (int i = 0; i < len / 2; i++) {
        // 使用临时变量来交换字符
        temp = str[i];
        str[i] = str[len - i - 1];
        str[len - i - 1] = temp;
    }
}
 
int main() {
    char myString[] = "Example!";
    printf("原字符串: %s\n", myString);
    reverseString(myString);
    printf("反转后的字符串: %s\n", myString);
    return 0;
}